package com.example.coder_voucher.exception;

public class VoucherAlreadyClaimedException extends RuntimeException {
    
    public VoucherAlreadyClaimedException(String message) {
        super(message);
    }
    
    public VoucherAlreadyClaimedException(String message, Throwable cause) {
        super(message, cause);
    }
    
    public static VoucherAlreadyClaimedException forUser(String username, String voucherCode) {
        return new VoucherAlreadyClaimedException(
            "User " + username + " has already claimed voucher " + voucherCode);
    }
}